package cn.pconline.autoclub.entity;

import java.util.Date;
import org.gelivable.dao.Column;
import org.gelivable.dao.Entity;
import org.gelivable.dao.Id;
import org.gelivable.dao.Label;
import org.gelivable.dao.Mid;

/**
 * 车友会动态索引用
 *
 * @author <a href="mailto:chensy0203@163.com">chensy</a>
 */
@Entity(tableName = "ac_club_dyna", split = "Mod:clubId:10")
@Label("动态")
public class ClubDyna {

    @Id
    @Label("车友会ID，复合主键")
    @Column(name = "club_id")
    private long clubId;
    @Id
    @Label("动态ID，复合主键")
    @Column(name = "dyna_info_id")
    private long dynaInfoId;
    /**
     * 跟DynaInfo保持一致
     *
     * @see DynaInfo
     */
    @Label("动态类型：1-普通帖子（旧数据包含提问帖子），2-说说动态，3-图片动态，4-提问帖子，5-公告动态，6-活动动态，7-新会员加入动态，8-创建车友会动态")
    @Column(name = "type")
    private int type;
    @Label("最后回复时间")
    @Column(name = "last_post_at")
    private Date lastPostAt;
    @Label("回复数")
    @Column(name = "post_count")
    private int postCount;
    /**
     * 跟DynaInfo保持一致
     *
     * @see DynaInfo
     */
    @Label("精华：1-是，0-否")
    @Column(name = "pick")
    private int pick;
    /**
     * 跟DynaInfo保持一致
     *
     * @see DynaInfo
     */
    @Label("1-是，0-否")
    @Column(name = "recommend")
    private int recommend;
    @Label("版块id")
    @Column(name = "forum_id")
    private long forumId;
    @Label("发表时间")
    @Column(name = "create_date")
    private Date createDate;
    @Label("创建时间")
    @Column(name = "create_at")
    private Date createAt;
    @Label("创建者")
    @Column(name = "create_by")
    private long createBy;
    /**
     * 跟DynaInfo保持一致
     *
     * @see DynaInfo
     */
    @Label("状态，1：正常，-1：删除")
    @Column(name = "status")
    private int status;
    public static final int STATUS_NORMAL = DynaInfo.STATUS_NORMAL;
    public static final int STATUS_DELETE = DynaInfo.STATUS_DELETE;
    
    @Label("置顶：1-是，0-否")
    @Column(name = "is_top")
    private int isTop;
    public static final int TOP_YES = 1;//置顶
    public static final int TOP_NO = 0;//非置顶
    @Label("置顶时间")
    @Column(name = "top_date")
    private Date topDate;
    
    public Mid getId() {
        return new Mid(clubId, dynaInfoId);
    }
      
    public long getClubId() {
        return clubId;
    }

    public void setClubId(long clubId) {
        this.clubId = clubId;
    }

    public long getDynaInfoId() {
        return dynaInfoId;
    }

    public void setDynaInfoId(long dynaInfoId) {
        this.dynaInfoId = dynaInfoId;
    }

    public int getType() {
        return type;
    }

    public void setType(int type) {
        this.type = type;
    }

    public Date getLastPostAt() {
        return lastPostAt;
    }

    public void setLastPostAt(Date lastPostAt) {
        this.lastPostAt = lastPostAt;
    }

    public int getPostCount() {
        return postCount;
    }

    public void setPostCount(int postCount) {
        this.postCount = postCount;
    }

    public int getPick() {
        return pick;
    }

    public void setPick(int pick) {
        this.pick = pick;
    }

    public int getRecommend() {
        return recommend;
    }

    public void setRecommend(int recommend) {
        this.recommend = recommend;
    }

    public long getForumId() {
        return forumId;
    }

    public void setForumId(long forumId) {
        this.forumId = forumId;
    }

    public Date getCreateDate() {
        return createDate;
    }

    public void setCreateDate(Date createDate) {
        this.createDate = createDate;
    }

    public Date getCreateAt() {
        return createAt;
    }

    public void setCreateAt(Date createAt) {
        this.createAt = createAt;
    }

    public int getStatus() {
        return status;
    }

    public void setStatus(int status) {
        this.status = status;
    }

    public long getCreateBy() {
        return createBy;
    }

    public void setCreateBy(long createBy) {
        this.createBy = createBy;
    }

	public int getIsTop() {
		return isTop;
	}

	public void setIsTop(int isTop) {
		this.isTop = isTop;
	}

	public Date getTopDate() {
		return topDate;
	}

	public void setTopDate(Date topDate) {
		this.topDate = topDate;
	}
	
    
}
